package com.anycl.design.structural.filter;

import java.util.ArrayList;
import java.util.List;

public class DryRubbishCriteria implements Criteria {
    public List<Rubbish> rubbishFilter(List<Rubbish> rubbishes) {
        List<Rubbish> rubbishList = new ArrayList<Rubbish>();
        for (Rubbish rubbish: rubbishes) {
            if (rubbish.isDry())
                rubbishList.add(rubbish);
        }
        return rubbishList;
    }
}
